#!/bin/sh

disk=$1
echo $1
    echo "Creating partitions on /dev/sd${disk} ..."
    parted -a optimal --script /dev/sd${disk} -- mktable gpt
    sleep 1
    parted -a optimal --script /dev/sd${disk} -- mkpart primary xfs 0% 10%
    sleep 1
     parted -a optimal --script /dev/sd${disk} -- mkpart primary xfs 10% 20%
    echo "Formatting xfs /dev/sd${disk}1 ..."
    #mkfs.xfs -f /dev/sd${disk}1 &

